package cn.xorange.commons.system.controller.monitor;

import cn.xorange.commons.core.basic.bean.ResultBean;
import cn.xorange.commons.security.annotation.Authorize;
import cn.xorange.commons.utils.server.Server;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务器监控
 * 
 * @author ruoyi
 */
@RestController
@RequestMapping("/monitor/server")
public class ServerController {
    @Authorize(hasPerm = "monitor:server:list")
    @GetMapping()
    public ResultBean getInfo() throws Exception {
        Server server = new Server();
        server.copyTo();
        return ResultBean.onSuccess(server);
    }
}
